{
 "cells": [
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Thermal models\n",
    "\n",
    "There are a number of thermal submodels available in PyBaMM. In this notebook we give details of each of the models, and highlight any relevant parameters. At present PyBaMM includes an isothermal and a lumped thermal model, both of which can be used with any cell geometry, as well as a 1D thermal model which accounts for the through-cell variation in temperature in a pouch cell, and \"1+1D\" and \"2+1D\" pouch cell models which assumed the temperature is uniform through the thickness of the pouch, but accounts for variations in temperature in the remaining dimensions. Here we give the governing equations for each model (except the isothermal model, which just sets the temperature to be equal to to the parameter \"Ambient temperature [K]\"). \n",
    "\n",
    "A more comprehensive review of the pouch cell models, including how to properly compute the effective cooling terms, can be found in references [4] and [6] at the end of this notebook."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Note: you may need to restart the kernel to use updated packages.\n"
     ]
    }
   ],
   "source": [
    "%pip install \"pybamm[plot,cite]\" -q    # install PyBaMM if it is not installed\n",
    "import pybamm"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Lumped model\n",
    "\n",
    "The lumped thermal model solves the following ordinary differential equation for the average temperature, given here in dimensional terms,\n",
    "\n",
    "$$\n",
    "\\rho_{eff} \\frac{\\partial T}{\\partial t} = \\bar{Q} - \\frac{hA}{V}(T-T_{\\infty}),\n",
    "$$\n",
    "\n",
    "where $\\rho_{eff}$ is effective volumetric heat capacity, $T$ is the temperature, $t$ is time, $\\bar{Q}$ is the averaged heat source term, $h$ is the heat transfer coefficient, $A$ is the surface area (available for cooling), $V$ is the cell volume, and $T_{\\infty}$ is the ambient temperature. An initial temperature $T_0$ must be prescribed.\n",
    "\n",
    "\n",
    "The effective volumetric heat capacity is computed as \n",
    "\n",
    "$$\n",
    "\\rho_{eff} = \\frac{\\sum_k \\rho_k c_{p,k} L_k}{\\sum_k L_k},\n",
    "$$\n",
    "\n",
    "where $\\rho_k$ is the density, $c_{p,k}$ is the specific heat, and $L_k$ is the thickness of each component. The subscript $k \\in \\{cn, n, s, p, cp\\}$ is used to refer to the components negative current collector, negative electrode, separator, positive electrode, and positive current collector.\n",
    "\n",
    "The heat source term accounts for Ohmic heating $Q_{Ohm,k}$ due to resistance in the solid and electrolyte, irreverisble heating due to electrochemical reactions $Q_{rxn,k}$, reversible heating due to entropic changes in the the electrode $Q_{rev,k}$, and heating due to contact resistance $Q_{cr}$:\n",
    "\n",
    "$$\n",
    "Q = Q_{Ohm,k}+Q_{rxn,k}+Q_{rev,k}+Q_{cr},\n",
    "$$\n",
    "\n",
    "with\n",
    "\n",
    "$$ \n",
    "Q_{Ohm,k} = -i_k \\nabla \\phi_k, \\quad Q_{rxn,k} = a_k j_k \\eta_k, \\quad Q_{rev,k} = a_k j_k T_k \\frac{\\partial U}{\\partial T} \\bigg|_{T=T_{\\infty}}, Q_{cr} = \\frac{R_{cr}}{V_{cell}}i_k^2.\n",
    "$$\n",
    "\n",
    "Here $i_k$ is the current, $\\phi_k$ the potential, $a_k$ the surface area to volume ratio, $j_k$ the interfacial current density, $\\eta_k$ the overpotential, $U$ the open-circuit potential, $R_{cr}$ is the contact resistance, and $V_{cell}$ is the total cell volume. The averaged heat source term $\\bar{Q}$ is computed by taking the volume-average of $Q$.\n",
    "\n",
    "\n"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "When using the option `{\"cell geometry\": \"arbitrary\"}` the relevant parameters to specify the cooling conditions are:  \n",
    "\n",
    "\"Total heat transfer coefficient [W.m-2.K-1]\"  \n",
    "\"Cell cooling surface area [m2]\"  \n",
    "\"Cell volume [m3]\"\n",
    "\n",
    "which correspond directly to the parameters $h$, $A$ and $V$ in the governing equation.\n",
    "\n",
    "When using the option `{\"cell geometry\": \"pouch\"}` the parameter $A$ and $V$ are computed automatically from the pouch dimensions, assuming a single-layer pouch cell, i.e. $A$ is the total surface area of a single-layer pouch cell and $V$ is the volume. The parameter $h$ is still set by the \"Total heat transfer coefficient [W.m-2.K-1]\" parameter.\n",
    "\n",
    "When using the option `{\"contact resistance\": \"true\"}` the parameter \"Contact resistance [Ohm]\" must be specified to calculate the heating from contact resistance, which corresponds to $R_{cr}$. \"Cell volume [m3]\" is $V_{cell}$ within the governing equation. The default lumped model option is `{\"contact resistance\": \"false\"}`.\n",
    "\n",
    "The lumped thermal option can be selected as follows\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "options = {\"cell geometry\": \"arbitrary\", \"thermal\": \"lumped\"}\n",
    "arbitrary_lumped_model = pybamm.lithium_ion.DFN(options)\n",
    "# OR\n",
    "options = {\"cell geometry\": \"pouch\", \"thermal\": \"lumped\"}\n",
    "pouch_lumped_model = pybamm.lithium_ion.DFN(options)"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "If no cell geometry is specified, the \"arbitrary\" cell geometry is used by default"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Cell geometry: arbitrary\n"
     ]
    }
   ],
   "source": [
    "options = {\"thermal\": \"lumped\"}\n",
    "model = pybamm.lithium_ion.DFN(options)\n",
    "print(\"Cell geometry:\", model.options[\"cell geometry\"])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The contact resistance option can be turned on via the following"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "options = {\"thermal\": \"lumped\", \"contact resistance\": \"true\"}\n",
    "model = pybamm.lithium_ion.DFN(options)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The default option for the lumped model does not include contact resistance."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "contact resistance: false\n"
     ]
    }
   ],
   "source": [
    "options = {\"thermal\": \"lumped\"}\n",
    "model = pybamm.lithium_ion.DFN(options)\n",
    "print(\"contact resistance:\", model.options[\"contact resistance\"])"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Pouch cell models"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 1D (through-cell) model\n",
    "\n",
    "The 1D model solves for $T(x,t)$, capturing variations through the thickness of the cell, but ignoring variations in the other dimensions. The temperature is found as the solution of a partial differential equation, given here in dimensional terms\n",
    "\n",
    "$$\\rho_k c_{p,k} \\frac{\\partial T}{\\partial t} = \\lambda_k \\nabla^2 T + Q(x,t) - Q_{cool}(x,t)$$\n",
    "\n",
    "with boundary conditions \n",
    "\n",
    "$$ -\\lambda_{cn} \\frac{\\partial T}{\\partial x}\\bigg|_{x=0} = h_{cn}(T_{\\infty} - T) \\quad -\\lambda_{cp} \\frac{\\partial T}{\\partial x}\\bigg|_{x=1} = h_{cp}(T-T_{\\infty}),$$\n",
    "\n",
    "and initial condition\n",
    "\n",
    "$$ T\\big|_{t=0} = T_0.$$\n",
    "\n",
    "Here $\\lambda_k$ is the thermal conductivity of component $k$, and the heat transfer coefficients $h_{cn}$ and $h_{cp}$ correspond to heat transfer at the large surface of the pouch on the side of the negative current collector, heat transfer at the large surface of the pouch on the side of the positive current collector, respectively. The heat source term $Q$ is as described in the section on lumped models. The term $Q_cool$ accounts for additional heat losses due to heat transfer at the sides of the pouch, as well as the tabs. This term is computed automatically by PyBaMM based on the cell geometry and heat transfer coefficients on the edges and tabs of the cell.\n",
    "\n",
    "The relevant heat transfer parameters are:\n",
    "\"Negative current collector surface heat transfer coefficient [W.m-2.K-1]\"\n",
    "\"Positive current collector surface heat transfer coefficient [W.m-2.K-1]\"\n",
    "\"Negative tab heat transfer coefficient [W.m-2.K-1]\"\n",
    "\"Positive tab heat transfer coefficient [W.m-2.K-1]\"\n",
    "\"Edge heat transfer coefficient [W.m-2.K-1]\"\n",
    "\n",
    "The 1D model is termed \"x-full\" (since it fully accounts for variation in the x direction) and can be selected as follows\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "options = {\"thermal\": \"x-full\"}\n",
    "model = pybamm.lithium_ion.DFN(options)"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Higher dimensional pouch cell models\n",
    "\n",
    "These pouch cell thermal models ignore any variation in temperature through the thickness of the cell (x direction), and solve for $T(y,z,t)$. It is therefore referred to as an \"x-lumped\" model. The temperature is found as the solution of a partial differential equation, given here in dimensional terms,\n",
    "\n",
    "$$\n",
    "\\rho_{eff} \\frac{\\partial T}{\\partial t} = \\lambda_{eff} \\nabla_\\perp^2T + \\bar{Q} - \\frac{(h_{cn}+h_{cp})A}{V}(T-T_{\\infty}),\n",
    "$$\n",
    "\n",
    "along with boundary conditions\n",
    "\n",
    "$$\n",
    "-\\lambda_{eff} \\nabla_\\perp T \\cdot \\boldsymbol{n} = \\frac{L_{cn}h_{cn} + (L_n+L_s+L_p+L_{cp})h_{edge}}{L_{cn}+L_n+L_s+L_p+L_{cp}}(T-T_\\infty),\n",
    "$$\n",
    "\n",
    "at the negative tab,\n",
    "\n",
    "$$\n",
    "-\\lambda_{eff} \\nabla_\\perp T \\cdot \\boldsymbol{n} = \\frac{(L_{cn}+L_n+L_s+L_p)h_{edge}+L_{cp}h_{cp}}{L_{cn}+L_n+L_s+L_p+L_{cp}}(T-T_\\infty),\n",
    "$$\n",
    "\n",
    "at the positive tab, and\n",
    "\n",
    "$$\n",
    "-\\lambda_{eff} \\nabla_\\perp T \\cdot \\boldsymbol{n} = h_{edge}(T-T_\\infty),\n",
    "$$\n",
    "\n",
    "elsewhere. Again, an initial temperature $T_0$ must be prescribed.\n",
    "\n",
    "Here the heat source term is averaged in the x direction so that $\\bar{Q}=\\bar{Q}(y,z)$. The parameter $\\lambda_{eff}$ is the effective thermal conductivity, computed as \n",
    "\n",
    "$$\n",
    "\\lambda_{eff} = \\frac{\\sum_k \\lambda_k L_k}{\\sum_k L_k}.\n",
    "$$\n",
    "\n",
    "The heat transfer coefficients $h_{cn}$, $h_{cp}$ and $h_{egde}$ correspond to heat transfer at the large surface of the pouch on the side of the negative current collector, heat transfer at the large surface of the pouch on the side of the positive current collector, and  heat transfer at the remaining, respectively.\n",
    "\n",
    "The relevant heat transfer parameters are:\n",
    "\"Negative current collector surface heat transfer coefficient [W.m-2.K-1]\"\n",
    "\"Positive current collector surface heat transfer coefficient [W.m-2.K-1]\"\n",
    "\"Negative tab heat transfer coefficient [W.m-2.K-1]\"\n",
    "\"Positive tab heat transfer coefficient [W.m-2.K-1]\"\n",
    "\"Edge heat transfer coefficient [W.m-2.K-1]\"\n",
    "\n",
    "The \"2+1D\" model can be selected as follows"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "options = {\n",
    "    \"current collector\": \"potential pair\",\n",
    "    \"dimensionality\": 2,\n",
    "    \"thermal\": \"x-lumped\",\n",
    "}\n",
    "model = pybamm.lithium_ion.DFN(options)"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Model usage"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Here we compare the \"full\" one-dimensional model with the lumped model for a pouch cell. We first set up our models, passing the relevant options, and then show how to adjust the parameters to so that the lumped and full models give the same behaviour"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "full_thermal_model = pybamm.lithium_ion.SPMe(\n",
    "    {\"thermal\": \"x-full\"}, name=\"full thermal model\"\n",
    ")\n",
    "lumped_thermal_model = pybamm.lithium_ion.SPMe(\n",
    "    {\"thermal\": \"lumped\"}, name=\"lumped thermal model\"\n",
    ")\n",
    "models = [full_thermal_model, lumped_thermal_model]"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We then pick our parameter set"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "parameter_values = pybamm.ParameterValues(\"Marquis2019\")"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "For the \"full\" model we use a heat transfer coefficient of $5\\,  \\text{Wm}^{-2}\\text{K}^{-1}$ on the large surfaces of the pouch and zero heat transfer coefficient on the tabs and edges"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "full_params = parameter_values.copy()\n",
    "full_params.update(\n",
    "    {\n",
    "        \"Negative current collector\"\n",
    "        + \" surface heat transfer coefficient [W.m-2.K-1]\": 5,\n",
    "        \"Positive current collector\"\n",
    "        + \" surface heat transfer coefficient [W.m-2.K-1]\": 5,\n",
    "        \"Negative tab heat transfer coefficient [W.m-2.K-1]\": 0,\n",
    "        \"Positive tab heat transfer coefficient [W.m-2.K-1]\": 0,\n",
    "        \"Edge heat transfer coefficient [W.m-2.K-1]\": 0,\n",
    "    }\n",
    ")"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "For the lumped model we set the \"Total heat transfer coefficient [W.m-2.K-1]\"\n",
    "parameter as well as the \"Cell cooling surface area [m2]\" parameter. Since the \"full\"\n",
    "model only accounts for cooling from the large surfaces of the pouch, we set the\n",
    "\"Surface area for cooling\" parameter to the area of the large surfaces of the pouch,\n",
    "and the total heat transfer coefficient to $5\\,  \\text{Wm}^{-2}\\text{K}^{-1}$ "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [],
   "source": [
    "A = parameter_values[\"Electrode width [m]\"] * parameter_values[\"Electrode height [m]\"]\n",
    "lumped_params = parameter_values.copy()\n",
    "lumped_params.update(\n",
    "    {\n",
    "        \"Total heat transfer coefficient [W.m-2.K-1]\": 5,\n",
    "        \"Cell cooling surface area [m2]\": 2 * A,\n",
    "    }\n",
    ")"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Let's run simulations with both options and compare the results. For demonstration purposes we'll increase the current to amplify the thermal effects"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "b29f3527b0cb47b888bf748ff800f359",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "interactive(children=(FloatSlider(value=0.0, description='t', max=1154.7660708378553, step=11.547660708378553)…"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "7de290974a0c4649b7edddae4562bf90",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "interactive(children=(FloatSlider(value=0.0, description='t', max=1154.7660708378553, step=11.547660708378553)…"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "<pybamm.plotting.quick_plot.QuickPlot at 0x17f501e90>"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "params = [full_params, lumped_params]\n",
    "# loop over the models and solve\n",
    "sols = []\n",
    "for model, param in zip(models, params, strict=False):\n",
    "    param[\"Current function [A]\"] = 3 * 0.68\n",
    "    sim = pybamm.Simulation(model, parameter_values=param)\n",
    "    sim.solve([0, 3600])\n",
    "    sols.append(sim.solution)\n",
    "\n",
    "\n",
    "# plot\n",
    "output_variables = [\n",
    "    \"Voltage [V]\",\n",
    "    \"X-averaged cell temperature [K]\",\n",
    "    \"Cell temperature [K]\",\n",
    "]\n",
    "pybamm.dynamic_plot(sols, output_variables)\n",
    "\n",
    "# plot the results\n",
    "pybamm.dynamic_plot(\n",
    "    sols,\n",
    "    [\n",
    "        \"Volume-averaged cell temperature [K]\",\n",
    "        \"Volume-averaged total heating [W.m-3]\",\n",
    "        \"Current [A]\",\n",
    "        \"Voltage [V]\",\n",
    "    ],\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "For the lumped model, we can compare how the contact resistance affects the heating. To do so, we must set the `\"contact resistance\"` option to `\"true\"` and update the `\"Contact resistance [Ohm]\"` parameter."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "model_no_contact_resistance = pybamm.lithium_ion.SPMe(\n",
    "    {\"cell geometry\": \"arbitrary\", \"thermal\": \"lumped\", \"contact resistance\": \"false\"},\n",
    "    name=\"lumped thermal model\",\n",
    ")\n",
    "model_contact_resistance = pybamm.lithium_ion.SPMe(\n",
    "    {\"cell geometry\": \"arbitrary\", \"thermal\": \"lumped\", \"contact resistance\": \"true\"},\n",
    "    name=\"lumped thermal model with contact resistance\",\n",
    ")\n",
    "models = [model_no_contact_resistance, model_contact_resistance]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We then choose a parameter set."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "parameter_values = pybamm.ParameterValues(\"Marquis2019\")\n",
    "lumped_params = parameter_values.copy()\n",
    "lumped_params_contact_resistance = parameter_values.copy()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "For the contact resistance model, we must specify a contact resistance greater than zero. The default is zero."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "lumped_params_contact_resistance.update(\n",
    "    {\n",
    "        \"Contact resistance [Ohm]\": 0.05,\n",
    "    }\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The models and parameters are then used to solve for a 1C discharge."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "params = [lumped_params, lumped_params_contact_resistance]\n",
    "sols = []\n",
    "for model, param in zip(models, params, strict=False):\n",
    "    sim = pybamm.Simulation(model, parameter_values=param)\n",
    "    sim.solve([0, 3600])\n",
    "    sols.append(sim.solution)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We can then compare the voltage and cell temperature and see the impact of the contact resistance."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "1254ec88a920400096b25541577ee948",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "interactive(children=(FloatSlider(value=0.0, description='t', max=1.0, step=0.01), Output()), _dom_classes=('w…"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "<pybamm.plotting.quick_plot.QuickPlot at 0x338900950>"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "output_variables = [\n",
    "    \"Voltage [V]\",\n",
    "    \"X-averaged cell temperature [K]\",\n",
    "    \"Cell temperature [K]\",\n",
    "]\n",
    "pybamm.dynamic_plot(sols, output_variables)"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## References\n",
    "\n",
    "The relevant papers for this notebook are:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[1] Joel A. E. Andersson, Joris Gillis, Greg Horn, James B. Rawlings, and Moritz Diehl. CasADi – A software framework for nonlinear optimization and optimal control. Mathematical Programming Computation, 11(1):1–36, 2019. doi:10.1007/s12532-018-0139-4.\n",
      "[2] Marc Doyle, Thomas F. Fuller, and John Newman. Modeling of galvanostatic charge and discharge of the lithium/polymer/insertion cell. Journal of the Electrochemical society, 140(6):1526–1533, 1993. doi:10.1149/1.2221597.\n",
      "[3] Charles R. Harris, K. Jarrod Millman, Stéfan J. van der Walt, Ralf Gommers, Pauli Virtanen, David Cournapeau, Eric Wieser, Julian Taylor, Sebastian Berg, Nathaniel J. Smith, and others. Array programming with NumPy. Nature, 585(7825):357–362, 2020. doi:10.1038/s41586-020-2649-2.\n",
      "[4] Scott G. Marquis, Valentin Sulzer, Robert Timms, Colin P. Please, and S. Jon Chapman. An asymptotic derivation of a single particle model with electrolyte. Journal of The Electrochemical Society, 166(15):A3693–A3706, 2019. doi:10.1149/2.0341915jes.\n",
      "[5] Valentin Sulzer, Scott G. Marquis, Robert Timms, Martin Robinson, and S. Jon Chapman. Python Battery Mathematical Modelling (PyBaMM). Journal of Open Research Software, 9(1):14, 2021. doi:10.5334/jors.309.\n",
      "[6] Robert Timms, Scott G Marquis, Valentin Sulzer, Colin P. Please, and S Jonathan Chapman. Asymptotic Reduction of a Lithium-ion Pouch Cell Model. SIAM Journal on Applied Mathematics, 81(3):765–788, 2021. doi:10.1137/20M1336898.\n",
      "\n"
     ]
    }
   ],
   "source": [
    "pybamm.print_citations()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "venv",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.9"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": true
  },
  "vscode": {
   "interpreter": {
    "hash": "9ff3d0c7e37de5f5aa47f4f719e4c84fc6cba7b39c571a05173422444e82fa58"
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
